﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Farming.EntityFarmworkCore.Migrations
{
    public partial class initData : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Admins",
                columns: table => new
                {
                    AdminId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    PassWord = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    LastLoginIp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LastLoginTime = table.Column<DateTime>(type: "datetime2", maxLength: 50, nullable: true),
                    CreateById = table.Column<int>(type: "int", nullable: true),
                    CreateByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdById = table.Column<int>(type: "int", nullable: true),
                    UpdByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    DelById = table.Column<int>(type: "int", nullable: true),
                    DelByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Admins", x => x.AdminId);
                });

            migrationBuilder.InsertData(
                table: "Admins",
                columns: new[] { "AdminId", "CreateById", "CreateByName", "CreateTime", "DelById", "DelByName", "DelTime", "IsDel", "LastLoginIp", "LastLoginTime", "PassWord", "UpdById", "UpdByName", "UpdTime", "UserName" },
                values: new object[] { 1, 1, "Admin", new DateTime(2024, 9, 11, 21, 50, 40, 549, DateTimeKind.Local).AddTicks(7027), null, null, null, false, null, null, "e287f40c96df44d9ad837f270922949d", null, null, null, "Admin" });

            migrationBuilder.InsertData(
                table: "Admins",
                columns: new[] { "AdminId", "CreateById", "CreateByName", "CreateTime", "DelById", "DelByName", "DelTime", "IsDel", "LastLoginIp", "LastLoginTime", "PassWord", "UpdById", "UpdByName", "UpdTime", "UserName" },
                values: new object[] { 2, 1, "Admin", new DateTime(2024, 9, 17, 21, 50, 40, 549, DateTimeKind.Local).AddTicks(7053), null, null, null, false, null, null, "efe63644fd3a4dc78814c1f522120190", null, null, null, "lisi" });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Admins");
        }
    }
}
